#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "rs485_init.h"


int rs485_default_config(sys_cfg_info *sys, rs485_cfg_info *rs485)
{
	rs485->rs485_en = OFF;
	strcpy(rs485->rs485_mode, "server");
	rs485->rs485_modbus_en = ON;
	rs485->rs485_dev_id = 1;

	strcpy(rs485->rs485_uart_cfg.com, "ttyS2");
	rs485->rs485_uart_cfg.baudrate = B9600BPS;
	rs485->rs485_uart_cfg.bits = DATA_8BITS;
	rs485->rs485_uart_cfg.parity = NONE;
	rs485->rs485_uart_cfg.stop = STOP_1BIT;

	if (sys->debug == ON)
		printf("rs485 channel variables init finished!\n");

	return SUCCESS;
}


